/*
  Edit from astro’s global.css.
  https://github.com/withastro/astro/blob/c46210d8db9e88bd6b316be779809f0e44715030/examples/blog/src/styles/global.css

  The CSS in this style tag is based off of Bear Blog's default CSS.
  https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
  License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
 */

:root {
  --main-color: #000;
  --main-hover-color: #222939;
  --raw-bg-color: rgba(101, 117, 133, 0.16);
  --main-bg-color: #fafcfc;
  --nav-bg-color: #fafcfc;
  --gray-color: #6d6d6d;
  --accent: oklch(51.51% .2307 257.85);
  --accent-dark: oklch(64.94% .1982 251.813);
  --black: #0f1219;
}

:root.dark {
  --main-color: #dfdfd6;
  --main-hover-color: #fff;
  --gray-color: #939da3;
  --raw-bg-color: #65758529;
  --main-bg-color: #212737;
  --nav-bg-color: #212737;
  --accent: oklch(71.7% .1648 250.794);
  --accent-dark: oklch(51.51% .2307 257.85);
}

body {
  --vp-font-family-base: "Inter Variable", "Noto Sans SC", "PingFang SC",
    "Microsoft Yahei", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas",
    "Liberation Mono", "Courier New", monospace;

  font-family: var(--vp-font-family-base);
  margin: 0;
  padding: 0;
  background: var(--main-bg-color);
  background-size: 100% 600px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--main-color);
  line-height: 1.7;
}
main,
.search {
  max-width: min(56rem, calc(100% - 2em));
  margin: auto;
}
main {
  padding: 3em 1em;
}
@media (max-width: 720px) {
  main {
    padding: 1em;
  }
  body {
    text-align: left;
  }
}
:root {
  --heading-hash-offset-1: 1.75rem;
  --heading-hash-offset-2: 1.75rem;
  --heading-hash-offset-3: 1.75rem;
  --heading-hash-offset-4: 1.75rem;
  --heading-hash-offset-5: 1.75rem;
}

h1 :target,
h2 :target,
h3 :target,
h4 :target,
h5 :target,
h6 :target {
  scroll-margin-top: 1.25em;
}
h1 {
  font-size: 2.75em;
  margin-block-start: 0em;
  margin-block-end: 0.8888889em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  line-height: 1.1111111;
}
h2 {
  font-size: 2em;
  margin-block-start: 1.6em;
  margin-block-end: 0.6em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  line-height: 1.3333333;
}
h3 {
  font-size: 1.5em;
  margin-block-start: 1.5em;
  margin-block-end: 0.6em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  line-height: 1.45;
}
h4 {
  font-size: 1.25em;
  margin-block-start: 1.5em;
  margin-block-end: 0.6em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  line-height: 1.6;
}
h5 {
  font-size: 1.1em;
  margin-block-start: 1.5em;
  margin-block-end: 0.5em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
  text-align: start;
}
p {
  margin-block-end: 0.5em;
}
strong,
b {
  font-weight: 700;
}
a,
.link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
a,
.link {
  transition: color 0.1s, underline 0.1s;
}
a:hover,
.link:hover {
  color: var(--accent-dark);
  text-decoration: underline solid 2px;
}
textarea {
  width: 100%;
  font-size: 16px;
}
input {
  font-size: 16px;
}
table {
  width: 100%;
}
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
pre,
code,
kbd,
samp {
  font-family: var(--vp-font-family-mono);
}
code {
  padding: 2px 5px;
  background-color: var(--raw-bg-color);
  border-radius: 2px;
}
pre {
  padding: 1.5em;
  border-radius: 8px;
}
pre > code {
  all: unset;
}
blockquote {
  border-left: 4px solid var(--accent);
  padding: 0 0 0 18px;
  margin: 0px;
  font-size: 1.333em;
}
hr {
  border: none;
  border-top: 1px solid var(--raw-bg-color);
}

.sr-only {
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  /* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
  clip: rect(1px 1px 1px 1px);
  /* maybe deprecated but we need to support legacy browsers */
  clip: rect(1px, 1px, 1px, 1px);
  /* modern browsers, clip-path works inwards from each corner */
  clip-path: inset(50%);
  /* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
  white-space: nowrap;
}
nav a,
.social-links a {
  text-decoration: none;
  color: var(--main-color);
}
nav a:hover,
.social-links a:hover {
  color: var(--main-hover-color);
}
.icon svg {
  width: 32px;
  height: 32px;
  overflow: visible;
}
main .icon svg {
  width: 1em;
  height: 1em;
  margin: 0.25em;
  vertical-align: middle;
}
.icon svg path,
.icon svg circle {
  fill: currentColor;
}
.theme-icon {
  cursor: pointer;
}
.dark .code-image.themed .light {
  display: none;
}
.dark .code-image.themed .dark {
  display: initial;
}
.code-image.themed .light {
  display: initial;
}
.code-image.themed .dark {
  display: none;
}

figure {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  overflow-x: auto;
}
figure > img {
  width: 40%;
}
@media (max-width: 720px) {
  figure > img {
    width: 60%;
  }
}
figcaption {
  text-align: center;
}
.code-image svg {
  max-width: 100%;
  height: fit-content;
}
.inline-equation {
  display: inline-block;
  width: fit-content;
  margin: 0 0.15em;
}
.block-equation {
  display: grid;
  place-items: center;
  overflow-x: auto;
}
.block-list,
.block-list li {
  margin: 0;
  padding: 0;
}
.block-list > li {
  list-style: none;
  margin-top: 1.5em;
  padding-left: 1em;
  border-left: 2.5px solid var(--main-color);
}
.block-list.accent > li {
  border-left: 2.5px solid var(--accent);
}
